import { createApp } from 'vue'
import App from './App.vue'
// 全局异常接接收
import {globalException} from './anomaly/errorHandler.js'
// 1. 引入你需要的组件
import {
	Button,Tabbar,TabbarItem,Search,Grid, GridItem,
	Image as VanImage,List,TextEllipsis,Swipe,SwipeItem,
	Field, CellGroup,Overlay,Cell,Picker,Popup,DatePicker,
	Area,Uploader,Sidebar, SidebarItem,Divider,Tag,Dialog,
	Icon,Toast,Empty, Tab, Tabs,ImagePreview,Sticky, RadioGroup,
	Radio  
} from 'vant';
// 2. 引入组件样式
import 'vant/lib/index.css';
import 'amfe-flexible'

// 路由
import router from './router/index.js'
// 创建实例
import { createPinia } from 'pinia';
const pinia = createPinia();

const app = createApp(App)
// globalException(app);
// 3. 注册你需要的组件
app.use(Button);
app.use(Toast);
app.use(Tabbar);
app.use(TabbarItem);
app.use(Search);
app.use(Grid);
app.use(GridItem);
app.use(VanImage);
app.use(List);
app.use(TextEllipsis);
app.use(Swipe);
app.use(SwipeItem);
app.use(Field);
app.use(CellGroup);
app.use(Overlay);
app.use(Cell);
app.use(Picker);
app.use(Popup);
app.use(DatePicker);
app.use(Area);
app.use(Uploader);
app.use(Sidebar);
app.use(SidebarItem);
app.use(Divider);
app.use(Tag);
app.use(Dialog);
app.use(Icon);
app.use(router);
app.use(pinia);
app.use(Empty);
app.use(Tab);
app.use(Tabs);
app.use(ImagePreview);
app.use(Sticky);
app.use(Radio);
app.use(RadioGroup);
app.mount('#app');
